<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="u" uri="/WEB-INF/tld/unit.tld" %>
<div class="main_left">
<div class="cont">
	<a href="javascript:;" class="yellow_btn btn" onclick="loadModule();">返回</a>
    <h2 class="title">结算的商品：</h2>
    <div class="ui">
        <table class="table_list">
            <tr class="">
              <th class="">序号</th>
              <th>品名</th>
              <th class="">二维码</th>
              <th class="">年份</th>
              <th class="">批次</th>
              <th class="">类型</th>
              <th class="">价格（元）</th>
              <th class="">折扣</th>
              <th class="">折后价</th>
            </tr>
            <c:forEach items="${detail.products }" var="product" varStatus="status">
            <tr class="">
              <td class="">${status.index+1 }</td>
              <td class="">${product.product_name }</td>
              <td class="">${product.code }</td>
              <td class="">${product.productionyear }</td>
              <td class="">${product.batch }</td>
              <td class="">${product.myunit }</td>
              <td class="">${product.org_price }</td>
              <td class="">${product.discount }</td>
              <td class="">${product.now_price }</td>
            </tr>
            </c:forEach>
        </table>
    </div>
    <h2 class="title">寄存的商品：</h2>
    <div class="ui">
        <table class="table_list">
            <tr class="">
              <th class="">序号</th>
              <th>品名</th>
              <th class="">二维码</th>
              <th class="">年份</th>
              <th class="">批次</th>
              <th class="">类型</th>
              <th class="">价格（元）</th>
              <th class="">折扣</th>
              <th class="">折后价</th>
            </tr>
            <c:forEach items="${detail.saves }" var="save" varStatus="status">
            <tr class="">
              <td class="">${status.index+1 }</td>
              <td class="">${save.product_name }</td>
              <td class="">${save.code }</td>
              <td class="">${save.productionyear }</td>
              <td class="">${save.batch }</td>
              <td class="">${save.myunit }</td>
              <td class="">${save.org_price }</td>
              <td class="">${save.discount }</td>
              <td class="">${save.now_price }</td>
            </tr>
            </c:forEach>
        </table>
    </div>
    
    <h2 class="title">寄存者信息：</h2>
	<div class="b_div">
		<p class="clearfix">
			<span class="info_s fl">客户名称：${detail.customer.name }</span>
			<span class="info_s fl">联系电话：${detail.customer.tel }</span></span>
			<span class="info_s fl">传真：${detail.customer.fax }</span>
			<span class="info_s fl">邮箱：${detail.customer.email }</span>
		</p>
		<p class="clearfix">
			<span class="info_s fl">公司地址：${detail.customer.comaddress }</span>
		</p>
		<p class="clearfix">
			<span class="info_s fl">送货地址：${detail.customer.address }</span>
		</p>
	</div>
	</div>
	</div>
	<div class="main_right">
          <div class="cont">
            <h2 class="title">结账信息：</h2>
            <div class="money">
              <p class="a_title">销售总金额：<em>${detail.order.sum_amount }</em>元</p>
              <p> 明细--消费商品金额：<em>${detail.order.sum_buy }</em>元</p>
              <p>明细--寄存商品金额：<em>${detail.order.sum_save }</em>元</p>
            </div>
            <table class="table_list_nb">
              <tr class="">
                <td class="label_t">交易时间：</td>
                <td class="">${detail.order.order_date }</td>
              </tr>
              <tr class="">
                <td class="label_t">现金支付：</td>
                <td class="">${detail.order.pay_amount }</td>
              </tr>
              <tr class="">
                <td class="label_t">银行刷卡：</td>
                <td class="">${detail.order.bank_amount }</td>
              </tr>
              <tr class="">
                <td class="label_t">会员刷卡：</td>
                <td class="">${detail.order.vip_amount }</td>
              </tr>
              <tr class="">
                <td class="label_t">抹零：</td>
                <td class="">${detail.order.wipe_amount }</td>
              </tr>
              <tr class="">
                <td class="label_t">应收金额：</td>
                <td class="">${detail.order.pay_amount }</td>
              </tr>
              <tr class="">
                <td class="label_t">卡号：</td>
                <td class="">${detail.order.vip_no }</td>
              </tr>
          </table>
          </div>
           <a href="javascript:window.open('${basePath }/trade/scat_detail.htm?print=1&orderId=${detail.order.id }&customerId=${detail.customer.id}');" target="_blank" class="yellow_btn btn">打印小票</a>
      </div>

